package com.atjyb.processschudulesimulator.pojo;


public class Commend {
    //操作符 指令类型
    private String operator;
    //指令剩余运行时间
    private int IRemainTime;
    //操作数 指令运行时间
    private int IRuntime = 0;

    public Commend() {
    }

    public Commend(String operator, int IRemainTime, int IRuntime) {
        this.operator = operator;
        this.IRemainTime = IRemainTime;
        this.IRuntime = IRuntime;
    }

    public String getOperator() {
        return operator;
    }

    public void setOperator(String operator) {
        this.operator = operator;
    }

    public int getIRemainTime() {
        return IRemainTime;
    }

    public void setIRemainTime(int IRemainTime) {
        this.IRemainTime = IRemainTime;
    }

    public int getIRuntime() {
        return IRuntime;
    }

    public void setIRuntime(int IRuntime) {
        this.IRuntime = IRuntime;
    }

    public void subIRemainTime(){
        //剩余时间减1
        this.setIRemainTime(this.getIRemainTime()-1);

    }

    @Override
    public String toString() {
        return "Commend{" +
                "operator='" + operator + '\'' +
                ", IRemainTime=" + IRemainTime +
                ", IRuntime=" + IRuntime +
                '}';
    }
}
